<?php  if($showTitle) { ?>
	<h2><?php echo $title;?></h2>
<?php  } ?>

<?php  
$i = 0;
foreach($galleryItems as $galleryItem) 
{
	if(!is_array($galleryItem) && !isset($galleryItem['Asset']))
	{
		$galleryItem = array('Asset'=>$galleryItem);
	}
	if(strlen($galleryItem['Asset']['name']) < 1)
		continue;
	if($i!=0 && $i%$columns==0) echo "<div class='clr' ></div>"; ?>
	
 	<div class="galleryImage">
 		<?php echo $asset->preview($galleryItem, null, $imgOptions); ?>
	</div>
	
<?php $i++;
}
?>
<div class="clr"></div>	